﻿@model TCC.CMFlow.Models.Usuario

@{
    ViewBag.Title = "Grupo de Aprovação";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!-- modal placeholder-->
<div id='myModal' class='modal fade in'>
    <div class="modal-dialog">
        <div class="modal-content">
            <div id='myModalContent'></div>
        </div>
    </div>
</div>

<div class="panel panel-info" style="margin-top: 15px">
    <div class="panel-heading clearfix">

        <h3 class="panel-title pull-left"><strong>@ViewBag.Title</strong></h3>
        <div class="pull-right">
            @Html.ActionLink("Editar", "Edit", new { id = Model.Id }, new { @class = "btn btn-primary", id = "btnEdit", data_modal = "" })
            @Html.ActionLink("Listar Usuários", "Index", null, new { @class = "btn btn-default" })
        </div>

    </div>
    <div class="panel-body">

        <div>
            <dl class="dl-horizontal">
                <dt>
                    @Html.DisplayNameFor(model => model.Codigo)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Codigo)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Nome)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Nome)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.PerfilAcesso)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.PerfilAcesso.Nome)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Email)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Email)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.InicioVigencia)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.InicioVigencia)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.FimVigencia)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.FimVigencia)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Status)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Status)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Observacoes)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Observacoes)
                </dd>

            </dl>
        </div>

        <div class="panel panel-primary">
            <div class="panel-heading clearfix">
                <h3 class="panel-title pull-left"><strong>Grupos de Aprovação</strong></h3>
            </div>
            @*<div class="panel-body"></div>*@
            <table class="table table-striped table-bordered">
                <tr>
                    <th>
                        Nome
                    </th>
                    <th>
                        Descrição
                    </th>
                </tr>

                @foreach (var item in Model.GruposAprovacao)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.Nome)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Descricao)
                        </td>
                    </tr>
                }
            </table>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/modalform")
}

